// index.js
import api from '../../config/settings'
Page({
    data:{
    banner_list: [{img: '/images/banner/banner1.png'  }],
      notice: '六子的小程序测试demo~~'
    },
    onLoad(){
        console.log("call onLoad")
        wx.request({
          url: api.banner,
          method:'GET',
          success:(res)=>{
            this.setData({
              banner_list:res.data.banner,
              notice:res.data.notice.title
            })
          }
        })
    },
    gotoCollecton(){
        getApp().jumpPage("collection")
    },
    gotoActivity(){
        getApp().switchTab("activity")
    },
    gotoFace(){
        getApp().jumpPage("face")
    },
    gotoVoice(){
        getApp().jumpPage("voice")
    },
    gotoHeart(){
        getApp().jumpPage("heart")
    },
    gotoGoods(){
        getApp().jumpPage("goods")
    }
})
